<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            padding: 0px;
            margin: 0px;
        }

        .container {
            text-align: center;
        }

        ul {
            list-style-position: outside;
            display: inline-block;
            list-style: none;
        }

        li {
            border: 1px solid black;
            float: left;
            background-color: yellow;
            padding: 16px;
            max-width: 200px;
        }
    </style>
</head>

<body>
    <div class="container">
        <ul>
            <li>这是第1个</li>
            <li>这是第2个</li>
            <li>这是第3个</li>
            <li>这是第4个</li>
            <li>这是第5个</li>
            <li>这是第6个</li>
            <li>这是第7个</li>
            <li>这是第8个</li>
        </ul>
    </div>

</body>

</html>